﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:view="clr-namespace:XAMLStylePad.Views"
                    xmlns:viewmodel="clr-namespace:XAMLStylePad.ViewModels">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="StringAndIconsResources.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <ImageBrush x:Key="previewBackground" ImageSource="/images/previewBackground.png" TileMode="Tile"/>

    <Style x:Key="xamlGlyph" TargetType="Inline">
        <Setter Property="FontFamily" Value="Courier New"/>
        <Setter Property="FontSize" Value="12pt"/>
    </Style>

    <Style x:Key="controlChar" BasedOn="{StaticResource xamlGlyph}" TargetType="Inline">
        <Setter Property="Foreground" Value="Blue"/>
    </Style>

    <Style x:Key="tag" BasedOn="{StaticResource xamlGlyph}" TargetType="Inline">
        <Setter Property="Foreground" Value="DarkRed"/>
    </Style>

    <Style x:Key="attrName" BasedOn="{StaticResource xamlGlyph}" TargetType="Inline">
        <Setter Property="Foreground" Value="Red"/>
    </Style>

    <Style x:Key="attrValue" BasedOn="{StaticResource xamlGlyph}" TargetType="Inline">
        <Setter Property="Foreground" Value="Blue"/>
    </Style>

    <Style x:Key="text" BasedOn="{StaticResource xamlGlyph}" TargetType="Inline">
        <Setter Property="Foreground" Value="DarkRed"/>
        <Setter Property="FontWeight" Value="Bold"/>
    </Style>

    <Style x:Key="bordered" TargetType="Border">
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>

    <BitmapImage x:Key="AppIcon" UriSource="/images/AppIcon.png"/>
    <BitmapImage x:Key="BrowseIcon" UriSource="/images/BrowseIcon.png"/>
    
    <Style TargetType="view:XAMLEditor">
        <Setter Property="FontSize" Value="12"/>
    </Style>
    
    <HierarchicalDataTemplate x:Key="ViewModelItemTemplate"
                              ItemsSource="{Binding VisualChildren}">
        <StackPanel Orientation="Horizontal"
                    ContextMenu="{Binding ContextMenu}">
            <Image Source="{Binding Icon}" Margin="2"
                   Width="16" Height="16"/>
            <TextBlock Margin="5,2,2,2" VerticalAlignment="Center"
                       Text="{Binding DisplayName}"/>
        </StackPanel>
    </HierarchicalDataTemplate>
    
    <!--<Style TargetType="TreeViewItem">
        <Setter Property="IsExpanded" Value="True"/>
    </Style>-->
</ResourceDictionary>